package no.knowit.components.map;

import org.apache.tapestry5.BindingConstants;
import org.apache.tapestry5.RenderSupport;
import org.apache.tapestry5.annotations.Environmental;
import org.apache.tapestry5.annotations.IncludeJavaScriptLibrary;
import org.apache.tapestry5.annotations.Log;
import org.apache.tapestry5.annotations.Parameter;
import org.apache.tapestry5.annotations.Property;

@IncludeJavaScriptLibrary( { "util.js", "mapScript.js" })
public class GoogleMap {
	@Property
	@Parameter(required = true, defaultPrefix = BindingConstants.LITERAL)
	private String datakilde;
	@Environmental
	private RenderSupport renderSupport;

	@Log
	void setupRender() {
		renderSupport
				.addScriptLink("http://maps.google.com/maps/api/js?sensor=false");
		renderSupport.addScriptLink("http://www.google.com/jsapi");
	}

}
